From: Colin Walters Date: Thu, 12 Nov 2009 23:17:58 +0000 (-0500) Subject: [shellDBus] Avoid sending undefined over DBus X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~10666 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7c796b2d2ad7b2de6ccaf36ad0288a473dd69d4b;p=gnome-shell.git [shellDBus] Avoid sending undefined over DBus DBus doesn't have a notion of null/undefined, so do the lame thing and return the empty string. --- diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js index 1d998efff..8ff743ecc 100644 --- a/js/ui/shellDBus.js +++ b/js/ui/shellDBus.js @@ -48,6 +48,9 @@ GnomeShell.prototype = { let success; try { returnValue = JSON.stringify(eval(code)); + // A hack; DBus doesn't have null/undefined + if (returnValue == undefined) + returnValue = ""; success = true; } catch (e) { returnValue = JSON.stringify(e);